package com.desksoft.dao;

import java.util.List;
import java.util.Map;

import javax.inject.Inject;

import com.desksoft.common.BaseDao;
import com.desksoft.entity.WebAddress;
import com.desksoft.entity.mapper.WebAddressMapper;
import com.desksoft.vo.WebAddressVo;


public class WebAddressDao extends BaseDao {

	@Inject
	private WebAddressMapper  webAddressMapper ;
	
	/**
	 * 查找公共的网站
	 * @return
	 */
	public List<WebAddress> findCommonWebAddress(){
		return webAddressMapper.selectCommonWebAddress();
	}

	/**
	 * 插入
	 * @param webAddress
	 * @return
	 */
	public Integer insertWebAddress(WebAddress webAddress) {
		return webAddressMapper.insertWebAddress(webAddress);
	}
	
	
	public List<WebAddressVo> findMainContent() {
		return webAddressMapper.selectMainContent();
	}

	public List<WebAddress> selectByParentId(String categoryId) {
		return webAddressMapper.selectByParentId(categoryId);
	}

	public Integer delete(String id) {
		return webAddressMapper.delete(id);
	}

	public Integer updateSequ(Map<String, Object> map) {
		Integer count = webAddressMapper.updateSequ(map);
		return count;
	}
}
